<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1">


        <title>北京循一堂健康管理有限公司</title>

        <link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css">
		<link href="./plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" type="text/css">
        <link href="./plugins/bootstrap-datepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
		<link rel="stylesheet" type="text/css" href="./css/page.css"/>
		<link rel="stylesheet" href="../xunyitang/css/grzx.css">
    </head>


    <body class="fixed-left">
          <script src="./js/jquery.min.js"></script>
          <script type="text/javascript"> 
			$(function(){	
				$(".tab").slide({     //切换新闻
					titCell:".hd li",
					mainCell:".bd",
					targetCell:".more li",
					effect:"fade",
					autoPlay:false,
					trigger:"click",
					easing:"linear",
					delayTime:0
				});
				
				$(".yylb .tab").slide({     //切换新闻
					titCell:".hd li",
					mainCell:".bd",
					targetCell:".more li",
					effect:"fade",
					autoPlay:false,
					trigger:"click",
					easing:"linear",
					delayTime:0
				});

			});
			
			function ScrollImgLeft(){ 
			var speed=50; 
			var scroll_begin = document.getElementById("scroll_begin"); 
			var scroll_end = document.getElementById("scroll_end"); 
			var scroll_div = document.getElementById("scroll_div"); 
			scroll_end.innerHTML=scroll_begin.innerHTML; 
			function Marquee(){ 
			if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0) 
			scroll_div.scrollLeft-=scroll_begin.offsetWidth; 
			else 
			scroll_div.scrollLeft++; 
			} 
			var MyMar=setInterval(Marquee,speed); 
			scroll_div.onmouseover=function() {clearInterval(MyMar);} 
			scroll_div.onmouseout=function() {MyMar=setInterval(Marquee,speed);} 
			} 
		</script> 
		<div class="header">
			<div class="container right-b clearfix">
				<div class="logo fl"><img src="./images/logo.jpg"/></div>
				
				<div class="center fl">									 
					<div style="width:96%;height:21px;margin:0 auto;white-space: nowrap;overflow:hidden;" id="scroll_div" class="scroll_div"> 
						<div id="scroll_begin"> 					
							<a href="#" target="_blank"><i>·</i><span>请各位医生完善个人基本信息    <b>2018-07-26</b></span></a>             					        				
							<a href="#" target="_blank"><i>·</i><span>请各位医生完善个人基本信息    <b>2018-07-26</b></span></a>             					        				
							<a href="#" target="_blank"><i>·</i><span>请各位医生完善个人基本信息    <b>2018-07-26</b></span></a>             					        				
							<a href="#" target="_blank"><i>·</i><span>请各位医生完善个人基本信息    <b>2018-07-26</b></span></a>             					        				
						</div> 
						<div id="scroll_end"></div> 
					</div> 
					<script type="text/javascript">ScrollImgLeft();</script> 				 
				</div>
				
				<div class="data fr clearfix">
					<div class="tx">
						<img src="./images/logo.jpg" alt="" height="50"/>
					</div>	
					<div class="name">
						<button onclick="">退出登录</button>
						<p>欢迎胡凤亮医生<button onclick="" id="name"></button></p>
					</div>
					
					
				</div>
			</div>
		</div>
		<div class="main clearfix">
			<div class="tab fl">
			</div>	
		</div>
		<div class="grzx_container">
			<div class="grzx_box">
				<div class="grzx_top">
					<ul>
						<li><strong>我的账号</strong></li>
					</ul>
				</div>
				<div class="grzx_center">
					<div class="grzx_center_left">
						<div class="grzx_center_left_top">
							<img src="./images/touxiang1.png" alt="">
							<input type="file" id="btn_file" style="display:none;" accept=".png,.jpg,.jpeg,.gif" >
							<button type="button" onclick="F_Open_dialog()">上传照片</button>
						</div>
						<div class="grzx_center_left_down">
							<img src="./images/tianjia.png" alt="">
							<input type="file" id="btn_file" style="display:none" accept=".png,.jpg,.jpeg,.gif">
							<button type="button" onclick="F_Open_dialog()">上传证书</button>
						</div>
					</div>
					<div class="grzx_center_right">
						<div class="center_form">
							<ul><li>姓名：</li></ul>
							<input type="text" id="doctorname">
						</div>
						<div class="center_form">
							<ul><li>年龄：</li></ul>
							<input type="text" id="doctorage">
						</div>
						<div class="center_form" style="width:309px; height: 65px">
							<ul><li>性别：</li></ul>
							<label class="demo--label1">
								<input class="demo--radio" type="radio" name="demo-radio" id="doctorsex1">
								<span class="demo--radioInput"></span>先生
							</label>
							<label class="demo--label2">
								<input class="demo--radio" type="radio" name="demo-radio" id="doctorsex2">
								<span class="demo--radioInput"></span>女士
							</label>
						</div>
						<div class="center_form">
							<ul><li>岗位：</li></ul>
							<input type="text" id="doctorjob">
						</div>
						<div class="center_form">
							<ul><li>职称：</li></ul>
							<input type="text" id="doctordepartment">
						</div>
						<div class="center_form">
							<ul><li>擅长：</li></ul>
							<input type="text" id="doctorgood">
						</div>
						<div class="center_form_tap">
							<ul><li>主治：</li></ul>						
							<label class="demo--label1">
								<input class="demo--radio" type="checkbox" name="demo-radio" id="touteng">
								<span class="demo--radioInput"></span>头晕
							</label>
							<label class="demo--label2">
								<input class="demo--radio" type="checkbox" name="demo-radio" id="muxuan">
								<span class="demo--radioInput"></span>目眩
							</label>
							<label class="demo--label2">
								<input class="demo--radio" type="checkbox" name="demo-radio" id="touteng">
								<span class="demo--radioInput"></span>头疼
							</label>
							<label class="demo--label2">
								<input class="demo--radio" type="checkbox" name="demo-radio" id="pianteouteng">
								<span class="demo--radioInput"></span>偏头疼
							</label>
						</div>
						<div class="center_form" style="width: 75%">
							<ul><li>介绍：</li></ul>
							<textarea rows="3" cols="20" id="doctordes"></textarea>
						</div>
					</div>
				</div>
			</div>		
		</div>
		
		<div class="footer" style="left:0px">
			<p>版权所有  © 2018-2020 北京循一堂健康管理有限公司&nbsp;&nbsp;&nbsp;技术支持电话：010-62084321</p>
		</div>
        <script>
            var resizefunc = [];
        </script>

        <!-- jQuery  -->
        <script src="./js/bootstrap.min.js"></script>
        <script src="./plugins/select/js/bootstrap-select.min.js"></script>
    
        <script src="./plugins/bootstrap-table/bootstrap-table.min.js"></script>
        <script src="./plugins/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
        
        <script src="./plugins/bootstrap-datepicker/js/moment.js"></script>
        <script src="./plugins/bootstrap-datepicker/js/bootstrap-datetimepicker.min.js"></script>
        <script src="./js/jquery.SuperSlide.2.1.1.js" type="text/javascript" charset="utf-8"></script>
	
		<script type="text/javascript">
			window.baseUrl=localStorage.getItem("baseUrl");
			window.moreSearch="";
			window.sessionid=localStorage.getItem("sessionid");
			console.log(localStorage.getItem("Authorization"));
            jQuery(document).ready(function($) {
				var doctorId=localStorage.getItem("doctorId");
                $('#contentDiv').find('li').each(function() {
                    $(this).click(function() {
                        var index=$(this).index();
                        if(index==0){
                            window.location.href="patientlibrary.html";
                        }else if(index==2){
                            window.location.href="workplan.html";
                        // }else if(index==3){
                        //     window.location.href="workplan.html";
                        }else if(index==3){
                            window.location.href="usercenter.html";
                        }else if(index==4){
                            window.location.href="medicalservice.html";
                        }else if(index==5){
                            window.location.href="./im/main.html";
                        }else if(index==7){

                        }else if(index==8){

                        }else if(index==9){

                        }
                    })
                });
				$.ajax({
							type: "POST",
							url: window.baseUrl+"/xunyitang/westDoctor/doctorDetail?jsessionid="+window.sessionid,
							contentType: "application/x-www-form-urlencoded",
							data:{doctorId:doctorId},
							dataType: "json",
							async:false,
							beforeSend: function(request) {
								request.setRequestHeader("Token", localStorage.getItem("Authorization"));
							},
							success: function(data) {
								if(null!=data && null!=data.data){
									$("#doctorname").val(data.data.name);
									$("#doctorsex").val(data.data.sex);
									var tempSex=data.data.sex;
									if(tempSex=="男"){
										$("#doctorsex1").prop("checked",true);
									}else{
										$("#doctorsex2").prop("checked",true);
									}
									$("#doctorjob").val(data.data.job);
									$("#doctordepartment").val(data.data.department);
									$("#doctorgood").val(data.data.good);

									$("#doctordes").val(data.data.description);
								}
							},
							error: function(data) {

							}
						});
						
                $("#edit").click(function () {
                	$.map($table.bootstrapTable('getSelections'), function (row) {
                        $("#userName").val(row.uname);
                        $("#userSex").val(row.usex);
                        $("#userAge").val(row.xueli);
                        $("#userJob").val(row.roll);
                        $("#userBumen").selectpicker('val',row.bumen);
                        $("#userChannel").val(row.fro);
                        $("#userTime").val(row.disptime);
                        $("#userAttention").val(row.focus_member);
                        $('#userStatus').selectpicker('val',row.zhuangtai);
                        $("#userMemo").val(row.memo);
                        $("#datetimepicker").val(row.meettime);
                    });
                	
                });
                $("#saveBtn").click(function(){
                	var ids = getIdSelections();
                	var userStatus=$('#userStatus').val();
                	var userMemo=$('#userMemo').val();
                	var userInfo=$('#userInfo').val();
                	var userBumen=$('#userBumen').val();
                	var meettime=$("#datetimepicker").val();
					 $.ajax({
					    	url: "/updateJianli?id="+ids[0]+"&status="+userStatus+"&memo="+userMemo+"&bumen="+userBumen+"&meettime="+meettime,
					    	type: "GET",
					    	success:function (result){
					    		if (result.success==true){
					    			sweetAlert('更新成功');	
					    			refresh();
					    		}else{
					    			sweetAlert('更新失败,请重试!');	
					    			refresh();
					    		}
					    	}
				   });
                });
                $("#editPwdBtn").click(function () {
             	   var pwd = $("#newpwd").val();
            	   var pwd2 = $("#newpwd2").val();

            	   if(pwd == ""  ){
            	     alert("密码不能为空");
            	     return false;
            	   }
            	   if(pwd2 == ""  ){
            	    alert("密码不能为空");
            	     return false;
            	   }
            	   if(pwd != pwd2 ){
            		    alert("两次密码不一致");
            		     return false;
            		  }
					 $.ajax({
					    	url: "/modifypwd?pid=${member.member_id}&pname=${member.username}&newpwd="+pwd,
					    	type: "GET",
					    	success:function (result){
					    		sweetAlert('更新成功');	
					    	}
				   });
                });
                //刷新并跳转到第一页页面
                function refresh(){
                	//刷新并跳转到第一页
                	$table.bootstrapTable('selectPage',1);
                	//$table.bootstrapTable('refresh');
                };
                $("#btn_query").click(function(){
                	window.searchName=$("#searchName").val();
                	window.searchFocus=$("#searchFocus").val();
                	window.searchSex=$("#searchSex").val();
                	window.searchFrom=$("#searchFrom").val();
                	window.searchTo=$("#searchTo").val();
                	window.searchJob=$("#searchJob").val();
                	window.searchChannel=$("#searchChannel").val();
                	window.searchStatus=$("#searchStatus").val();
                	window.searchBumen=$("#searchBumen").val();
                	refresh();
                });
                $("#btn_more_query").click(function(){
                	window.moreSearch=$("#moreSearch").val();
                	refresh();
                });
            });
			/*上传照片*/
			function F_Open_dialog() 
				{ 
				document.getElementById("btn_file").click(); 
				}
			/*上传照片结束*/
        </script>
			
    
    </body>
</html>